<!--心理测评-->
<template>
<div class="container">
  <div class="xd-LearningHome-NoticeCenter">
    <el-container class="xd-el-container"> 
      <el-main class="xd-el-main">
        <router-view></router-view>
      </el-main> 
      <el-aside
        class="xd-el-aside"
        width="16vw"
      >
        <el-card
          class="box-card m_t_b_1vw"
          shadow="hover"
        >
          <div slot="header">
            <div class="tag">新品首发</div>
          </div>
          <div
            v-for="(item, index) in topNoticeList"
            :key="'top' + index"
            class="aside-list-item"
            @click="goNewsDetail(item.typeId)"
          >{{'· ' +item.title}}</div>
        </el-card>
      </el-aside>
    </el-container>
  </div>
</div>
</template>
<script>
export default {
  name: 'CinziqaoTest',
  data() {
    return {
      topNoticeList: [ 
        { title:"智力测试",describe:'智力测试智力测试智力测试智力测试',typeId:1},
       { title:"人格测试",describe:'人格测试人格测试人格测试人格测试',typeId:2},
       { title:"兴趣测试",describe:'兴趣测试兴趣测试兴趣测试兴趣测试',typeId:3},
       { title:"焦虑与抑郁测试",describe:'焦虑与抑郁测试焦虑与抑郁测试焦虑与抑郁测试焦虑与抑郁测试',typeId:4},
       { title:"多元智能测试",describe:'多元智能测试多元智能测试多元智能测试多元智能测试',typeId:5},
       { title:"运动能力测试",describe:'运动能力测试运动能力测试运动能力测试运动能力测试',typeId:6},
       { title:"趣味测试",describe:'趣味测试趣味测试趣味测试趣味测试',typeId:7},
      ]
    }
  },
  methods: {
    fetchNoticeList() {
      utils.post('/notice/importantNotice', {}, res => {
        if (res.success) {
          this.topNoticeList = res.data.rows
        }
      })
    },
    goNewsDetail(typeId) {
      //this.$router.push({ path: '/LearningHome/NoticeCenter/Detail', query: { id: id, activeMenu: '/LearningHome/NoticeCenter' } })
       this.$router.push({
        path: "/Cinziqao/Test/Detail",
        query: { typeId: typeId, activeMenu: "/Cinziqao/Test" },
      });
    }
  },
  created() {
    this.$store.commit('updateActiveMenu', '/Cinziqao/Test')
    //this.fetchNoticeList()
  }
}
</script>
<style>
.aside-list-item {
  cursor: pointer;
  padding: 5px 0
}
</style>
